package blueBridgeCup;

public class demo3 {
    public static void main(String[] args) {
        long ans=0;
        long sum=1;
        for (long i = 1; i<=2080 ; i++) {
            sum*=i;
            ans+=sum;
            sum%=1e9;
            ans%=1e9;
        }
        System.out.println(ans);
    }
}
